﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<title>应用安装</title>
<script type="text/javascript">
    var baseURL = "http://221.179.44.125:8080";
    var iOSURL = "https://gdcmcc.svn.codeplex.com/svn/index.plist";
    var androidURL = baseURL + "/bingo.dms/download/Bingosoft.Indexanalyse.apk";

    window.onload = function () {
        //document.all("weixin_tips").style.display = 'none';
        document.all("mdown").innerHTML = '<br><br><h1>正自动为您下载应用...</h1><h1>您也可以点击下面的按钮手工下载应用。</h1><br><br><center><input type="button" value="下载Android应用" onclick="android_install();" style="width:80%;height:120px;font-size:40px;"><br><br><input type=button value="下载iOS应用" onclick="iOS_install();" style="width:80%;height:120px;font-size:40px;"></center>';
        //  document.all("mdown").innerHTML += '<br><br><h1>如果未能成功下载，请使用打开手机浏览器，手工输入如下网址下载安装：<br><br><span style="font-size:40px;">&nbsp;&nbsp;&nbsp;&nbsp;' + baseURL + '</span></h1>';

        var browser = {
            versions: function () {
                var u = navigator.userAgent,
					app = navigator.appVersion;
                return {

                    trident: u.indexOf('Trident') > -1,
                    //IE内核
                    presto: u.indexOf('Presto') > -1,
                    //opera内核
                    webKit: u.indexOf('AppleWebKit') > -1,
                    //苹果、谷歌内核
                    gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1,
                    //火狐内核
                    mobile: !!u.match(/AppleWebKit.*Mobile.*/) || !!u.match(/AppleWebKit/),
                    //是否为移动终端
                    ios: u.indexOf('iPhone') > -1 || u.indexOf('iPad') > -1,
                    //ios终端
                    android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1,
                    //android终端或者uc浏览器
                    iPhone: u.indexOf('iPhone') > -1,
                    //是否为iPhone或者QQHD浏览器
                    iPad: u.indexOf('iPad') > -1,
                    //是否iPad
                    webApp: u.indexOf('Safari') == -1 //是否web应该程序，没有头部与底部
                };
            } (),
            language: (navigator.browserLanguage || navigator.language).toLowerCase()
        }
        if (browser.versions.ios) {
            iOS_install();

        } else {
            android_install();

        }
    }
    function iOS_install() {
        window.location.href = "itms-services://?action=download-manifest&url=" + encodeURIComponent(iOSURL);
    }
    function android_install() {
        window.location.href = androidURL;
    }
</script>
</head>
<body>
    <div id="weixin_tips" name="weixin_tips">
        <h1 style="font-size: 30px;">
            <b>提醒：如果您无法下载应用，请点击右上角按钮复制链接用浏览器打开进行下载安装。</b></h1>
    </div>
    <div id="mdown" name="mdown">
    </div>
</body>
</html>
